package admin.controllers;

import java.io.IOException;
import java.util.List;
import java.util.TreeMap;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import admin.data.StoreData;

import models.StoreModel;


public class ListStoreServlet extends HttpServlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws IOException {
		response.setCharacterEncoding("UTF-8");
		
		StoreData storeData = new StoreData();
		List<StoreModel> listStore= storeData.getListStore(); 

		request.setAttribute("listStore", listStore);

		try {
			request.getRequestDispatcher("/admin/pages/list_store.jsp").forward(request, response);
		} catch (ServletException e) {
			e.printStackTrace();
		}
	}
}